class Person {
  name: string = "";
  public sayHello() {
    console.log(this.name + " say Hello");
  }
}

class Teacher extends Person {
  public sayBye() {
    console.log(this.name + ' sya Bye');
  }
}
const person = new Person();
person.name = "TT";
person.sayHello();
console.log(person.name);

const teacher = new Teacher ()
teacher.name = 'Tery'
teacher.sayBye()
